package com.jungle.client.vo;

import javafx.beans.property.SimpleStringProperty;
import javafx.beans.property.StringProperty;
import lombok.Getter;
import lombok.Setter;

import java.util.Objects;
import java.util.StringJoiner;

@Setter
@Getter
public class ScenarioFactorVo {
    private String id;
    /**
     * 接口标识
     */
    private String apiId;
    /**
     * 接口请求路径
     */
    private String apiPath;

    /**
     * 数据标题
     */
    private String title;

    /**
     * 数据集标识
     */
    private String datasetId;
    /**
     * 数据集名称
     */
    private String datasetName;

    /**
     * 显示值
     */
    private String displayValue;// = new SimpleStringProperty();
    /**
     * 实际值
     */
    private String value;// = new SimpleStringProperty();

    @Override
    public String toString() {
        return new StringJoiner(", ", ScenarioFactorVo.class.getSimpleName() + "[", "]")
                .add("displayValue='" + displayValue + "'")
                .add("value='" + value + "'")
                .toString();
    }

    @Override
    public boolean equals(Object object) {
        if (this == object) return true;
        if (object == null || getClass() != object.getClass()) return false;
        ScenarioFactorVo that = (ScenarioFactorVo) object;
        return Objects.equals(id, that.id) && Objects.equals(apiId, that.apiId) && Objects.equals(apiPath, that.apiPath) && Objects.equals(title, that.title) && Objects.equals(datasetId, that.datasetId) && Objects.equals(datasetName, that.datasetName) && Objects.equals(displayValue, that.displayValue) && Objects.equals(value, that.value);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, apiId, apiPath, title, datasetId, datasetName, displayValue, value);
    }
}
